package com.zzxy.springmvc5.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@RequestMapping("/test")
@Controller
public class TestController {
    @RequestMapping("/test2.do")
    public String test2(@RequestParam(required = true,defaultValue = "30",name = "id")int id){
        System.out.println("id:"+id);
        return "forward:/stu/register.do";
    }
    @RequestMapping("/test3.do")
    public String test3(){
        return "redirect:/stu/register.do";
    }
}
